<?php
/**
 * CEOfox
 *
 * @copyright  Copyright 2011-2012 CEOfox, Inc.
 * @license    http://ceofox.com/pages/license
 * @version    $Id: pending.html.php 27089 2013-05-24 09:40:17 $
 * @author     CEOfox, Inc.
 */
?>
<?php
    defined('PHPFOX') or exit('NO DICE!');
?>
{if $aSetting.auto_approval == 1}
    <a href="#"><span class="block follow-button button" style="float:right" onclick="$Core.follow.changeApproval({$iCurrUserId}, 0, 'user'); return false;">{phrase var='follow.unset_auto_approval'}</span></a>
{else}
    <a href="#"><span class="block follow-button button" style="float:right" onclick="$Core.follow.changeApproval({$iCurrUserId}, 1, 'user'); return false;">{phrase var='follow.set_auto_approval'}</span></a>
{/if}
<div class="clear"></div>
{if count($aItems)}
<div class="table_header">
    {phrase var='follow.pending_follow_requests'}
</div>
{foreach from=$aItems item=aItem name=user}        
<div id="js_pending_{$aItem.pending_id}" class="following_row_holder js_selector_class_{$aItem.user_id} {if is_int($phpfox.iteration.user/2)}row1{else}row2{/if}{if $phpfox.iteration.user == 1 && !PHPFOX_IS_AJAX} row_first{/if}">
    <div class="friend_image" id="js_image_div_{$aItem.user_id}">    
        {img id='sJsUserImage_'$aItem.user_id'' user=$aItem suffix='_50_square' max_width=50 max_height=50}
    </div>
    <div class="friend_user_name">
        {$aItem|user:'':'':50} 
    </div>
    <a href="#"><span class="block follow-button button" style="float:right" onclick="$Core.follow.confirmFollowIndex('{$sType}',{$iCurrUserId},{$aItem.user_id},{$aItem.pending_id});return false;">{phrase var='follow.confirm'}</span></a>
    <a href="#"><span class="block follow-button button button-off" style="float:right" onclick="$Core.follow.denyFollowIndex('{$sType}',{$iCurrUserId},{$aItem.user_id},{$aItem.pending_id});return false;">{phrase var='follow.deny'}</span></a>      
</div>
{/foreach}
{else}
    <div class="extra_info">
        {phrase var='follow.no_requests_found'}
    </div>
{/if}